package com.woniu.repaircenter.models.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Data
@ApiModel(value = "新增维修单表单")

public class AddRepairForm {

    /**
     * 维修内容
     */
    @ApiModelProperty(value = "维修内容")
    @NotBlank(message = "维修内容不能为空")
    @Size(min = 1,max = 50, message = "维修内容长度不能超过50")
    private String repairContent;


    /**
     * 维修类别ID
     */
    @ApiModelProperty(value = "维修类别ID")
    @NotNull(message = "维修类别ID不能为空")
    private Long repairCategoryId;


    /**
     * 维修区域
     */
    @ApiModelProperty(value = "维修区域id")
    @NotBlank(message = "维修区域id不能为空")
    private String repairArea;

    /**
     * 详细地址
     */
    @ApiModelProperty(value = "详细地址")
    @NotBlank(message = "详细地址不能为空")
    @Size(min = 1,max = 30, message = "详细地址长度不能超过30")
    private String detailedAddress;

    /**
     * 维修照片ids
     */
    @ApiModelProperty(value = "维修照片id")
    @Size(max = 2,message = "最多上传2张图片")
    private Integer[]  repairPhotoIds;


    /**
     * 维修用户名
     */
    @ApiModelProperty(value = "维修用户名")
    @NotBlank(message = "维修用户名不能为空")
    @Size(min = 1,max = 20, message = "维修用户名长度不能超过20")
    private String repairUserName;

    /**
     * 维修用户电话
     */
    @ApiModelProperty(value = "维修用户电话")
    @NotBlank(message = "维修用户电话不能为空")
    @Size(min = 11,max = 11, message = "维修用户电话格式错误")
    private String repairUserPhone;

    /**
     * 预约时间
     */
    @ApiModelProperty(value = "预约时间")
    @NotBlank(message = "预约时间不能为空")
    private String appointmentTime;


}
